package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.SalaryCycleAddDTO;
import org.jsola.hr.dto.SalaryCycleUpdateDTO;
import org.jsola.hr.query.SalaryCycleQuery;
import org.jsola.hr.vo.SalaryCycleListVO;
import org.jsola.hr.vo.SalaryCycleVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-计薪周期设置")
public interface ISalaryCycleControllerAPI {

    /**
     * 新增计薪周期设置
     * @param salaryCycleAddDTO 计薪周期设置新增实体
     * @return 计薪周期设置展示对象
     */
    @ApiOperation(value = "新增计薪周期设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleAddDTO", dataType = "SalaryCycleAddDTO", value = "新增计薪周期设置", paramType = "body")
    })
    Result<SalaryCycleVO> save(SalaryCycleAddDTO salaryCycleAddDTO);


    /**
     * 修改计薪周期设置
     * @param salaryCycleUpdateDTO 计薪周期设置
     * @return 更新数量
     */
    @ApiOperation(value = "修改计薪周期设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleUpdateDTO", dataType = "SalaryCycleUpdateDTO", value = "修改计薪周期设置", paramType = "body")
    })
    Result<Integer> update(SalaryCycleUpdateDTO salaryCycleUpdateDTO);




    /**
     * 删除单个计薪周期设置，彻底删除
     * @param salaryCycleId 计薪周期设置id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个计薪周期设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleId", dataType = "String", value = "计薪周期设置id", paramType = "path")
    })
    Result<Integer> delete(String salaryCycleId);


    /**
     * 批量删除计薪周期设置，彻底删除
     * @param salaryCycleIds 计薪周期设置id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除计薪周期设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleIds", dataType = "String[]", value = "计薪周期设置id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] salaryCycleIds);


    /**
     * 根据计薪周期设置id查询计薪周期设置详情
     * @param salaryCycleId 计薪周期设置id
     * @return 计薪周期设置详情
     */
    @ApiOperation(value="根据计薪周期设置id查询计薪周期设置详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleId", dataType = "String", value = "计薪周期设置id", paramType = "path")
    })
    Result<SalaryCycleVO> findById(String salaryCycleId);


    /**
     * 查询计薪周期设置
     * @param salaryCycleQuery 计薪周期设置查询参数
     * @return page
     */
    @ApiOperation(value="查询计薪周期设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleQuery", dataType = "SalaryCycleQuery", value = "计薪周期设置查询参数", paramType = "query")
    })
    Result<List<SalaryCycleListVO>> listAll(SalaryCycleQuery salaryCycleQuery);


     /**
     * 分页查询计薪周期设置
     * @param salaryCycleQuery 计薪周期设置查询参数
     * @return page
     */
    @ApiOperation(value="分页查询计薪周期设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleQuery", dataType = "SalaryCycleQuery", value = "计薪周期设置查询参数", paramType = "query")
    })
    Result<Page<SalaryCycleListVO>> page(SalaryCycleQuery salaryCycleQuery);

    /**
     * 新增或修改计薪周期设置
     * @param salaryCycleUpdateDTO 计薪周期设置
     * @return 更新数量
     */
    @ApiOperation(value = "新增或修改计薪周期设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCycleUpdateDTO", dataType = "SalaryCycleUpdateDTO", value = "修改计薪周期设置", paramType = "body")
    })
    Result<SalaryCycleVO> saveOrUpdate(@Valid @RequestBody SalaryCycleUpdateDTO salaryCycleUpdateDTO);

    /**
     * 根据计薪周期设置siteId查询计薪周期设置详情
     * @return 计薪周期设置详情
     */
    @ApiOperation(value="根据计薪周期设置siteId查询计薪周期设置详情")
    @ApiImplicitParams({
    })
    Result<SalaryCycleVO> selectDOBySiteId();


}

